﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace Utility.Models
{
    /// <summary>
    /// 实体类model_Donate_Order 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class model_Donate_Order : Entity
    {
        public model_Donate_Order() : base("model_Donate_Order")
        {
            _Id = Guid.NewGuid().ToString();
            _createDate = DateTime.Now;
        }

        #region Model
        private string _Id;
        private int? _donateId;
        private int? _way;
        private int? _choice;
        private int? _num;
        private decimal? _amount;
        private decimal? _payMoney;
        private bool? _needInvoice;
        private string _name;
        private int? _gender;
        private string _email;
        private string _phone;
        private string _province;
        private string _city;
        private string _district;
        private string _Address;
        private string _zipCode;
        private int? _UserId;
        private int? _Status;
        private string _orderId;
        private bool? _IsAlumni;
        private DateTime? _createDate;
        /// <summary>
        /// 主键
        /// </summary>
        public string Id
        {
            get { return _Id; }
            set
            {
                this.OnPropertyValueChange(_.Id, _Id, value);
                this._Id = value;
            }
        }
        /// <summary>
        /// 捐赠ID
        /// </summary>
        public int? donateId
        {
            get { return _donateId; }
            set
            {
                this.OnPropertyValueChange(_.donateId, _donateId, value);
                this._donateId = value;
            }
        }
        /// <summary>
        /// 支付方式(0支付宝1微信)
        /// </summary>
        public int? way
        {
            get { return _way; }
            set
            {
                this.OnPropertyValueChange(_.way, _way, value);
                this._way = value;
            }
        }
        /// <summary>
        /// 捐赠类型（100/1/0）
        /// </summary>
        public int? choice
        {
            get { return _choice; }
            set
            {
                this.OnPropertyValueChange(_.choice, _choice, value);
                this._choice = value;
            }
        }
        /// <summary>
        /// 捐赠个数
        /// </summary>
        public int? num
        {
            get { return _num; }
            set
            {
                this.OnPropertyValueChange(_.num, _num, value);
                this._num = value;
            }
        }
        /// <summary>
        /// 金额
        /// </summary>
        public decimal? amount
        {
            get { return _amount; }
            set
            {
                this.OnPropertyValueChange(_.amount, _amount, value);
                this._amount = value;
            }
        }
        /// <summary>
        /// 一般为捐赠选项*捐赠数量
        /// </summary>
        public decimal? payMoney
        {
            get { return _payMoney; }
            set
            {
                this.OnPropertyValueChange(_.payMoney, _payMoney, value);
                this._payMoney = value;
            }
        }
        /// <summary>
        /// 是否需要发票(1需要0不需要)
        /// </summary>
        public bool? needInvoice
        {
            get { return _needInvoice; }
            set
            {
                this.OnPropertyValueChange(_.needInvoice, _needInvoice, value);
                this._needInvoice = value;
            }
        }
        /// <summary>
        /// 姓名
        /// </summary>
        public string name
        {
            get { return _name; }
            set
            {
                this.OnPropertyValueChange(_.name, _name, value);
                this._name = value;
            }
        }
        /// <summary>
        /// 性别
        /// </summary>
        public int? gender
        {
            get { return _gender; }
            set
            {
                this.OnPropertyValueChange(_.gender, _gender, value);
                this._gender = value;
            }
        }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string email
        {
            get { return _email; }
            set
            {
                this.OnPropertyValueChange(_.email, _email, value);
                this._email = value;
            }
        }
        /// <summary>
        /// 电话
        /// </summary>
        public string phone
        {
            get { return _phone; }
            set
            {
                this.OnPropertyValueChange(_.phone, _phone, value);
                this._phone = value;
            }
        }
        /// <summary>
        /// 省
        /// </summary>
        public string province
        {
            get { return _province; }
            set
            {
                this.OnPropertyValueChange(_.province, _province, value);
                this._province = value;
            }
        }
        /// <summary>
        /// 市
        /// </summary>
        public string city
        {
            get { return _city; }
            set
            {
                this.OnPropertyValueChange(_.city, _city, value);
                this._city = value;
            }
        }
        /// <summary>
        /// 区
        /// </summary>
        public string district
        {
            get { return _district; }
            set
            {
                this.OnPropertyValueChange(_.district, _district, value);
                this._district = value;
            }
        }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address
        {
            get { return _Address; }
            set
            {
                this.OnPropertyValueChange(_.Address, _Address, value);
                this._Address = value;
            }
        }
        /// <summary>
        /// 邮编
        /// </summary>
        public string zipCode
        {
            get { return _zipCode; }
            set
            {
                this.OnPropertyValueChange(_.zipCode, _zipCode, value);
                this._zipCode = value;
            }
        }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int? UserId
        {
            get { return _UserId; }
            set
            {
                this.OnPropertyValueChange(_.UserId, _UserId, value);
                this._UserId = value;
            }
        }
        /// <summary>
        /// 状态(0未支付1支付)
        /// </summary>
        public int? Status
        {
            get { return _Status; }
            set
            {
                this.OnPropertyValueChange(_.Status, _Status, value);
                this._Status = value;
            }
        }
        /// <summary>
        /// 订单ID
        /// </summary>
        public string orderId
        {
            get { return _orderId; }
            set
            {
                this.OnPropertyValueChange(_.orderId, _orderId, value);
                this._orderId = value;
            }
        }
        /// <summary>
        /// 是否校友(1是0不是)
        /// </summary>
        public bool? IsAlumni
        {
            get { return _IsAlumni; }
            set
            {
                this.OnPropertyValueChange(_.IsAlumni, _IsAlumni, value);
                this._IsAlumni = value;
            }
        }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? createDate
        {
            get { return _createDate; }
            set
            {
                this.OnPropertyValueChange(_.createDate, _createDate, value);
                this._createDate = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
                _.Id};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
                _.Id,
                _.donateId,
                _.way,
                _.choice,
                _.num,
                _.amount,
                _.payMoney,
                _.needInvoice,
                _.name,
                _.gender,
                _.email,
                _.phone,
                _.province,
                _.city,
                _.district,
                _.Address,
                _.zipCode,
                _.UserId,
                _.Status,
                _.orderId,
                _.IsAlumni,
                _.createDate};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
                this._Id,
                this._donateId,
                this._way,
                this._choice,
                this._num,
                this._amount,
                this._payMoney,
                this._needInvoice,
                this._name,
                this._gender,
                this._email,
                this._phone,
                this._province,
                this._city,
                this._district,
                this._Address,
                this._zipCode,
                this._UserId,
                this._Status,
                this._orderId,
                this._IsAlumni,
                this._createDate};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._Id = DataUtils.ConvertValue<string>(reader["Id"]);
            this._donateId = DataUtils.ConvertValue<int?>(reader["donateId"]);
            this._way = DataUtils.ConvertValue<int?>(reader["way"]);
            this._choice = DataUtils.ConvertValue<int?>(reader["choice"]);
            this._num = DataUtils.ConvertValue<int?>(reader["num"]);
            this._amount = DataUtils.ConvertValue<decimal?>(reader["amount"]);
            this._payMoney = DataUtils.ConvertValue<decimal?>(reader["payMoney"]);
            this._needInvoice = DataUtils.ConvertValue<bool?>(reader["needInvoice"]);
            this._name = DataUtils.ConvertValue<string>(reader["name"]);
            this._gender = DataUtils.ConvertValue<int?>(reader["gender"]);
            this._email = DataUtils.ConvertValue<string>(reader["email"]);
            this._phone = DataUtils.ConvertValue<string>(reader["phone"]);
            this._province = DataUtils.ConvertValue<string>(reader["province"]);
            this._city = DataUtils.ConvertValue<string>(reader["city"]);
            this._district = DataUtils.ConvertValue<string>(reader["district"]);
            this._Address = DataUtils.ConvertValue<string>(reader["Address"]);
            this._zipCode = DataUtils.ConvertValue<string>(reader["zipCode"]);
            this._UserId = DataUtils.ConvertValue<int?>(reader["UserId"]);
            this._Status = DataUtils.ConvertValue<int?>(reader["Status"]);
            this._orderId = DataUtils.ConvertValue<string>(reader["orderId"]);
            this._IsAlumni = DataUtils.ConvertValue<bool?>(reader["IsAlumni"]);
            this._createDate = DataUtils.ConvertValue<DateTime?>(reader["createDate"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._Id = DataUtils.ConvertValue<string>(row["Id"]);
            this._donateId = DataUtils.ConvertValue<int?>(row["donateId"]);
            this._way = DataUtils.ConvertValue<int?>(row["way"]);
            this._choice = DataUtils.ConvertValue<int?>(row["choice"]);
            this._num = DataUtils.ConvertValue<int?>(row["num"]);
            this._amount = DataUtils.ConvertValue<decimal?>(row["amount"]);
            this._payMoney = DataUtils.ConvertValue<decimal?>(row["payMoney"]);
            this._needInvoice = DataUtils.ConvertValue<bool?>(row["needInvoice"]);
            this._name = DataUtils.ConvertValue<string>(row["name"]);
            this._gender = DataUtils.ConvertValue<int?>(row["gender"]);
            this._email = DataUtils.ConvertValue<string>(row["email"]);
            this._phone = DataUtils.ConvertValue<string>(row["phone"]);
            this._province = DataUtils.ConvertValue<string>(row["province"]);
            this._city = DataUtils.ConvertValue<string>(row["city"]);
            this._district = DataUtils.ConvertValue<string>(row["district"]);
            this._Address = DataUtils.ConvertValue<string>(row["Address"]);
            this._zipCode = DataUtils.ConvertValue<string>(row["zipCode"]);
            this._UserId = DataUtils.ConvertValue<int?>(row["UserId"]);
            this._Status = DataUtils.ConvertValue<int?>(row["Status"]);
            this._orderId = DataUtils.ConvertValue<string>(row["orderId"]);
            this._IsAlumni = DataUtils.ConvertValue<bool?>(row["IsAlumni"]);
            this._createDate = DataUtils.ConvertValue<DateTime?>(row["createDate"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "model_Donate_Order");
            /// <summary>
            /// 主键
            /// </summary>
            public readonly static Field Id = new Field("Id", "model_Donate_Order", "主键");
            /// <summary>
            /// 捐赠ID
            /// </summary>
            public readonly static Field donateId = new Field("donateId", "model_Donate_Order", "捐赠ID");
            /// <summary>
            /// 支付方式(0支付宝1微信)
            /// </summary>
            public readonly static Field way = new Field("way", "model_Donate_Order", "支付方式(0支付宝1微信)");
            /// <summary>
            /// 捐赠类型（100/1/0）
            /// </summary>
            public readonly static Field choice = new Field("choice", "model_Donate_Order", "捐赠类型（100/1/0）");
            /// <summary>
            /// 捐赠个数
            /// </summary>
            public readonly static Field num = new Field("num", "model_Donate_Order", "捐赠个数");
            /// <summary>
            /// 金额
            /// </summary>
            public readonly static Field amount = new Field("amount", "model_Donate_Order", "金额");
            /// <summary>
            /// 一般为捐赠选项*捐赠数量
            /// </summary>
            public readonly static Field payMoney = new Field("payMoney", "model_Donate_Order", "一般为捐赠选项*捐赠数量");
            /// <summary>
            /// 是否需要发票(1需要0不需要)
            /// </summary>
            public readonly static Field needInvoice = new Field("needInvoice", "model_Donate_Order", "是否需要发票(1需要0不需要)");
            /// <summary>
            /// 姓名
            /// </summary>
            public readonly static Field name = new Field("name", "model_Donate_Order", "姓名");
            /// <summary>
            /// 性别
            /// </summary>
            public readonly static Field gender = new Field("gender", "model_Donate_Order", "性别");
            /// <summary>
            /// 邮箱
            /// </summary>
            public readonly static Field email = new Field("email", "model_Donate_Order", "邮箱");
            /// <summary>
            /// 电话
            /// </summary>
            public readonly static Field phone = new Field("phone", "model_Donate_Order", "电话");
            /// <summary>
            /// 省
            /// </summary>
            public readonly static Field province = new Field("province", "model_Donate_Order", "省");
            /// <summary>
            /// 市
            /// </summary>
            public readonly static Field city = new Field("city", "model_Donate_Order", "市");
            /// <summary>
            /// 区
            /// </summary>
            public readonly static Field district = new Field("district", "model_Donate_Order", "区");
            /// <summary>
            /// 详细地址
            /// </summary>
            public readonly static Field Address = new Field("Address", "model_Donate_Order", "详细地址");
            /// <summary>
            /// 邮编
            /// </summary>
            public readonly static Field zipCode = new Field("zipCode", "model_Donate_Order", "邮编");
            /// <summary>
            /// 用户ID
            /// </summary>
            public readonly static Field UserId = new Field("UserId", "model_Donate_Order", "用户ID");
            /// <summary>
            /// 状态(0未支付1支付)
            /// </summary>
            public readonly static Field Status = new Field("Status", "model_Donate_Order", "状态(0未支付1支付)");
            /// <summary>
            /// 订单ID
            /// </summary>
            public readonly static Field orderId = new Field("orderId", "model_Donate_Order", "订单ID");
            /// <summary>
            /// 是否校友(1是0不是)
            /// </summary>
            public readonly static Field IsAlumni = new Field("IsAlumni", "model_Donate_Order", "是否校友(1是0不是)");
            /// <summary>
            /// 创建日期
            /// </summary>
            public readonly static Field createDate = new Field("createDate", "model_Donate_Order", "创建日期");
        }
        #endregion


    }
}

